<template>
    <div class="app-vip-warp">

        <img src="http://img.uuuda.com/udaWeapp2.0/icon/app/appvip1.png" class="appBg" />
        <div class="app-vip-bottom">
            <img src="http://img.uuuda.com/udaWeapp2.0/icon/app/appvip2.png" class="appBg" />
             <div class="app-link">www.xiaoucx.com</div>
             <div class="app-copy" @click="copyText('app-copy')" :data-clipboard-text="wxLink">点击复制链接</div>
            <img src="http://img.uuuda.com/udaWeapp2.0/icon/app/appvip3.png" class="appBg" />
        </div>

    </div>
</template>
<script>
let axios = require("axios");
import Clipboard from 'clipboard';
var interval = null;
export default {
    data() {
        return {
            wxLink:'www.xiaoucx.com'

        };
    },

    created() {
        let self=this;
    },
    mounted(){
        let self = this;


    },

    watch:{

    },
    methods: {

        //复制粘贴
        copyText(className){
            let self=this;
            console.log("fuzhi")
            const clipboard = new Clipboard('.'+className);
            clipboard.on('success', function(e) {

                e.clearSelection();
                // alert('复制成功')
                self.$dialog.toast({
                    mes: '复制成功',
                    timeout: 1500
                });
            });
            //失败回调
            clipboard.on('error', function(e) {
                // alert('复制失败,请手动复制');
                self.$dialog.toast({
                    mes: '复制失败,请手动添加',
                    timeout: 1500
                });
            });

        },





    }
};
</script>

<style>
    .app-vip-warp{
        position: absolute;
        width: 100%;
        height: 100%;
    }
    .app-vip-warp .appBg{
        position: relative;
        width: 100%;
    }
    .app-vip-bottom{
        position: relative;
        width: 100%;
        background: #474D66;
    }
    .app-link{
        position: relative;
        font-size:14px;
        font-family:PingFangSC-Semibold,PingFang SC;
        font-weight:600;
        color:rgba(204,225,255,1);
        line-height:20px;
        margin-left: 48px;
    }
    .app-copy{
        position: relative;
        width:88px;
        height:24px;
        background:rgba(25,121,255,1);
        border-radius:2px;
        border:1px solid rgba(25,121,255,1);
        font-size:12px;
        font-family:PingFangSC-Regular,PingFang SC;
        font-weight:400;
        color:rgba(255,255,255,1);
        line-height:24px;
        margin-left: 48px;
        text-align: center;
        margin-top: 8px;
    }



</style>
